package project.bank.views;

import java.awt.event.ActionListener;

import javax.swing.JButton;

import project.bank.contoller.ControllerAddCompAcc;
import project.bank.framwork.BaseForm;


public class BtnAddCompany extends JButton implements ICommandBtn {
	public BaseForm context;
	ControllerAddCompAcc controller;

	public BtnAddCompany(BankFrm context, ActionListener listener) {
		addActionListener(listener);
		this.context = context;

		controller = new ControllerAddCompAcc(context);
		JDialog_AddCompAcc dlg = new JDialog_AddCompAcc(context, controller);
		dlg.setBounds(450, 20, 300, 330);
		controller.setDialog(dlg);
	}

	@Override
	public void execute() {
		controller.showDialog();
	}
}
